package Model;

import Database.*;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

public class ModelMap extends Model {

    private int x;
    private int y;

    public ModelMap() {
        this.x = 10;
        this.y = 20;
    }

    public int returnX() {
        return this.x;
    }

    public int returnY() {
        return this.y;
    }

    public ResultSet getCoordonateStatii() {
        ResultSet date = null;
        BazaDate bd = new BazaDate();
        if (bd.conecteaza()) {
            GetCoordonate coord = new GetCoordonate(bd.conexiune());
            try {
                date = coord.coordonate();
            } catch (SQLException ex) {
                Logger.getLogger(ModelMap.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else {
            System.out.println("eroare la conectare");
        }
        return date;
    }
}
